﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.HumanResources
{
    public class TimeSheet : BusinessObject
    {
        public TimeSheet()
        {
            AddRule(new ValidateRequired("TimeSheetID"));

            AddRule(new ValidateRequired("TimeSheetCode"));
            AddRule(new ValidateLength("TimeSheetCode", 0, 20));

            AddRule(new ValidateRequired("TimeSheetName"));
            AddRule(new ValidateLength("TimeSheetName", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));
        }

        public TimeSheet(string timeSheetId, string timeSheetCode, string timeSheetName, int timeSheetMonth, int timeSheetYear, string restaurantId,
                               string description, bool isActive)
            : this()
        {
            TimeSheetID = timeSheetId;
            TimeSheetCode = timeSheetCode;
            TimeSheetName = timeSheetName;
            TimeSheetMonth = timeSheetMonth;
            TimeSheetYear = timeSheetYear;
            RestaurantID = restaurantId;
            Description = description;
            IsActive = isActive;
        }

        public string TimeSheetID { get; set; }

        public string TimeSheetCode { get; set; }

        public string TimeSheetName { get; set; }

        public int TimeSheetMonth { get; set; }

        public int TimeSheetYear { get; set; }

        public string RestaurantID { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }
    }
}
